# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kile
pkgver=2.9.93
pkgrel=4
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by texlive
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kde.org/applications/office/org.kde.kile"
pkgdesc="A user-friendly TeX/LaTeX editor"
license="GPL-2.0-or-later"
depends="texlive"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdoctools5-dev
	kguiaddons5-dev
	khtml-dev
	ki18n5-dev
	kiconthemes5-dev
	kinit5-dev
	kio5-dev
	kparts5-dev
	ktexteditor5-dev
	kwindowsystem5-dev
	kxmlgui5-dev
	okular-dev
	poppler-qt5-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/office/kile.git"
source="https://downloads.sourceforge.net/kile/kile-$pkgver.tar.bz2"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="d87277b8ef16c82cfd415dd191916641fa1a25e316e1eb2c463b275d3654dcfe180bea03027589ab30cd8b769d92d97005846a78aff8058bcfb20eed76287504  kile-2.9.93.tar.bz2"
